stanfordfandomcom-20200214-history
FDTD Plus
This is a Wiki for a finite-difference time-domain (FDTD) simulation software package developed by the research group of Shanhui Fan at Stanford University. The purpose of this Wiki is to * document the software package. * allow group members to post feedback on the software. = Overview = The name of the FDTD software package is FDTD Plus. Currently, a parallel version of FDTD Plus is available to Fan group members at Shanhuiserve, Bigben, NCSA and SDSC. =User input file= In order to run FDTD Plus, a user input file must be written. This user input file contains details on the structure to be simulated, and the outputs required from the simulation. This section describes the different possible user inputs available. Inputs are grouped into five groups, namely Options, Materials, Sources, Objects and Outputs. Options The main aim of the Option input is to set up the dimensions, boundaries, and cell type for the simulation. In addition, there are other options related to printing the material structure into a hdf5 file, performing a check on the user input file etc. CellParam Defines the type of cell used in the FDTD computation including the field type. (Option CellParam (CellType value) (FieldType value) (ScalarType value) ) cell_type = linear. field_type = complex, real. scalar_type = double (default), float. (Note: ScalarType is optional) DimensionParam Defines the spatial and time dimensions of the compute region. (Option DimensionParam (LengthScale (Value value) ) (Center (X value) (Y value) (Z value) ) (Size (X value) (Y value) (Z value) ) (Resolution (X value) (Y value) (Z value) ) (TimeParam (Start value) (End value) ) ) LengthScale (optional) The length scale of the compute region, value\in\mathbb{R}_{>0} . (Note : LengthScale only needs to be defined for frequency dependent or lossy materials). Center The center of the compute region, value\in\mathbb{R} (unit = LengthScale). Size The size of the compute region, value\in\mathbb{R}_{>0} (unit = LengthScale). Resolution The spatial increment in the compute region, value\in\mathbb{R}_{>0} (unit = LengthScale). TimeParam The time parameters for the FDTD run. Start (optional) The start time of computation value\in\mathbb{R} (unit = LengthScale / c, where c = speed of light in vacuum). Default value = 0. End The end time of computation value\in\mathbb{R}_{\geq{Start}} (unit = LengthScale / c). BoundaryParam Defines the boundaries of the compute region. (Option BoundaryParam (Type (X value) (Y value) (Z value) ) (PmlParam (Size (X value1 value2) (Y value1 value2) (Z value1 value2) ) (Type value) (DecayConstant value) ) (BlochParam (KL (X value) (Y value) (Z value) ) ) (Symmetry (Type (X value) (Y value) (Z value) ) ) ) Type The type of boundaries in the compute region, value\in\{pml, bloch, none \} , where pml is a Perfectly Matched Layer ([http://en.wikipedia.org/wiki/Perfectly_Matched_Layer PML]) boundary, bloch is a [http://en.wikipedia.org/wiki/Bloch_wave Bloch] boundary, none results in the boundary that includes the origin of the compute region to be of type PEC (E-fields parallel to boundary set to zero), and the opposite boundary of the compute region to be of type PMC (H-fields parallel to boundary set to zero). PmlParam (optional) The parameters for PML boundaries. (Note: PmlParam is only required to be defined if any BoundaryParam::Type is pml). Size The size of the PML boundary. (Note 1: Size is included in DimensionParam::Size) (Note 2: Size is only required to be defined for directions with BoundaryParam::Type pml). =value1 = The PML boundary size for the boundary that includes the origin of the compute region, value1\in\mathbb{R}_{\geq{0}} (unit = DimensionParam::LengthScale). =value2 (optional = The PML boundary size for the boundary that does not include the origin of the compute region, value2\in\mathbb{R}_{\geq{0}} (unit = DimensionParam::LengthScale). Default value = value2 . Type The type of PML boundary, value\in\{upml \} , where upml is a Uniaxial PML. DecayConstant (optional) The PML decay constant, value\in\mathbb{R}_{>0} (unit = c / LengthScale). Default value = 1\times{10}^{-6} . BlochParam (optional) The parameters for Bloch boundaries. (Note: BlochParam is only required to be defined if any BoundaryParam::Type is bloch). KL The Bloch k-vectors for the Bloch boundaries, value\in\mathbb{R} (unit = K\:L/2\pi , where K = Bloch k-vector, L = DimensionParam::Size). (Note : KL is only required to be defined for directions with BoundaryParam::Type bloch). Symmetry (optional) The type of symmetry in the compute region. Generally, setting symmetry for a particular direction results in half of the corresponding DimensionParam::Size being used for FDTD computation. Type The type of symmetry in a direction, value\in\{pec, pmc \} , where pec results in a Perfect Electric Conductor (PEC) boundary where the E-fields parallel to the boundary are set to zero. pmc results in a Perfect Magnetic Conductor (PMC) boundary where the H-fields parallel to the boundary are set to zero.